<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/account_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>资金管理</strong> &gt;&gt;  易居宝  &gt;&gt; 回款记录
		</div>
		
		<div class="admin_right_con" >
			<table border="0" cellspacing="1" cellpadding="0" >
			  <tr style="color:#0068b7;">
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>编号</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>投资客</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>借款标</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>投标金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>投标时间</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>期限</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>应还金额</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>应还时间</strong></td>
				<td height="35" align="center" valign="middle" bgcolor="#F1F1F1"><strong>状态</strong></td>
				
			  </tr>
			  <?php 
			  $borrow_tender_status = array(
			  	'1'=>'投标成功',
			  	'3'=>'已还完',
			  );
			  ?>
			  <?php foreach($list as $key=>$tender){?>
			  <tr>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $tender['id'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $tender['username'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $tender['title'];?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($tender['account'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('m-d H:i', $tender['add_time']);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $tender['time_limit_day'];?>天</td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo number_format($tender['repayment_account'],2);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo date('m-d', $tender['repay_time']);?></td>
				<td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $borrow_tender_status[$tender['fstatus']];?></td>
			  </tr>
			  <?php }?>
			  <tr>
			  	<td height="35" colspan="9" align="right" bgcolor="#FFFFFF">
			  		<form action="/sys_admin/yjb/repaylist.html" method="get">
			  			用户名称：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo $username?>" />
			  			是否内部账号：<select id="is_self" name="is_self">
			  				<option value="-1" <?php if($is_self==-1){?>selected="selected"<?php }?>>所有</option>
			  				<option value="0" <?php if($is_self==0){?>selected="selected"<?php }?>>客户</option>
			  				<option value="1" <?php if($is_self==1){?>selected="selected"<?php }?>>马甲</option>
			  			</select>
			  			状态：<select id="fstatus" name=fstatus>
			  				<option value="0" <?php if($fstatus==0){?>selected="selected"<?php }?>>所有</option>
			  				<option value="1" <?php if($fstatus==1){?>selected="selected"<?php }?>>投标成功</option>
			  				<option value="3" <?php if($fstatus==3){?>selected="selected"<?php }?>>已还完</option>
			  			</select>
			  			期限：<select id="time_limit_day" name="time_limit_day">
			  				<option value="0" <?php if($time_limit_day==0){?>selected="selected"<?php }?>>所有</option>
			  				<option value="7" <?php if($time_limit_day==7){?>selected="selected"<?php }?>>7天</option>
			  				<option value="15" <?php if($time_limit_day==15){?>selected="selected"<?php }?>>15天</option>
			  				<option value="20" <?php if($time_limit_day==20){?>selected="selected"<?php }?>>20天</option>
			  				<option value="30" <?php if($time_limit_day==30){?>selected="selected"<?php }?>>30天</option>
			  			</select>
			  			开始时间：<input type="text" id="r_strtime" name="r_strtime" value="<?php echo $r_strtime;?>"  onfocus="WdatePicker()" style="width:100px;"/>
			  			结束时间：<input type="text" id="r_endtime" name="r_endtime" value="<?php echo $r_endtime;?>"  onfocus="WdatePicker()" style="width:100px;"/>
			  			<input type="submit"/>
			  		</form>
			  	</td>
			  </tr>
			  <tr>
			  	<td height="35" colspan="8" align="center" bgcolor="#FFFFFF">
			  		 实际回款人数：<font style="color:red;"><?php echo $total_people;?></font>
			  		 回款总金额：<font style="color:red;"><?php echo number_format($total_repay,2);?></font>元
			  	</td>
			  	<td colspan="1"  height="35" align="right" valign="middle" bgcolor="#FFFFFF"><!-- <a href="/sys_admin/borrow/tenderlistexcel?username=<?php echo $username;?>&is_self=<?php echo $is_self;?>&fstatus=<?php echo $fstatus;?>&title=<?php echo $title;?>&time_limit=<?php echo $time_limit;?>&strtime=<?php echo $strtime;?>&endtime=<?php echo $endtime;?>">导出数据</a>--> </td>
			  </tr>
			  <tr>
			  	<td colspan="12"  height="35" align="center" valign="middle" bgcolor="#FFFFFF" class="page"><?php echo $this->pagination->create_links();?>共<?php echo $count;?>条记录</td>
			  </tr>
			</table>
			</div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->

<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
</body>
</html>
